package com.yk.airline.component.crawler.api;

import com.yk.airline.model.AirLineModel;
import com.yk.airline.model.CaptureMarkModel;
import com.yk.airline.model.CaptureWebsiteModel;
import org.openqa.selenium.firefox.FirefoxDriver;

/**
 * Project Name:airlinecrawler
 * File Name:ICrawlerService
 * Package Name:com.yk.airline.component.crawler.api
 * Date:2018/1/30 14:55
 * Author:zhangshaoyang
 * Description:
 * Copyright (c) 2018, 重庆云凯科技有限公司 All Rights Reserved.
 */
public interface ICrawlerService {


    /**
     * 抓取网页
     *
     *
     * @param webDriver
     * @param captureMarkModel
     * @param airLineModel
     * @param captureWebsiteModel
     * @param time
     * @return
     * @throws InterruptedException
     */
    Object crawlerHtmlByWebdriver(FirefoxDriver webDriver, CaptureMarkModel captureMarkModel, AirLineModel airLineModel, CaptureWebsiteModel captureWebsiteModel, String time) throws InterruptedException;


    /**
     * 保存model
     *
     * @param airLineModel
     * @param captureWebsiteModel
     * @param html
     * @return
     */
    Object saveModel(CaptureMarkModel captureMarkModel, AirLineModel airLineModel, CaptureWebsiteModel captureWebsiteModel, String html);

}
